#pragma once

#include "public.h"
using namespace cv;
using namespace std;

class HK_camera
{
public:
  HK_camera(image_transport::Publisher *_pub_ptr,size_t _camera_index):pub_ptr(_pub_ptr),camera_index(_camera_index)
  {}
  ~HK_camera(void);

public:
  bool Init();                                                                    //初始化
  bool Login(char *sDeviceAddress, char *sUserName, char *sPassword, WORD wPort); //登陆
  void show();                                                                    //显示图像
  void publish();                                               //发布图像
  static void CALLBACK DecCBFun(int nPort, char *pBuf, int nSize, FRAME_INFO *pFrameInfo, void *nUser, int nReserved2) ;
  static void CALLBACK g_RealDataCallBack_V30(LONG lPlayHandle, DWORD dwDataType, BYTE *pBuffer, DWORD dwBufSize, void *pUser);

public:
image_transport::Publisher *pub_ptr;
LONG camera_index;

  

private:
  LONG lUserID;
};